<?php
// get name and password passed from client
$name = $_GET['name'];
$pwd= $_GET['pwd'];
//sleep(10); // simulate delay at server
// write back the password concatenated to end of the name


//echo ($name." : ".$pwd)
$connection = mysqli_connect("localhost","root","");

if (!$connection)
die ("failed: ");

if (!mysqli_select_db($connection, "test"))
die("not connected:");


$SQLstring = "SELECT * FROM user";
$QueryResult = @mysqli_query($connection, $SQLstring);


echo "<table width='60%' border='1'>";
echo "<tr><th>ID</th><th>Name</th>
<th>Email</th></tr>";
$Row = mysqli_fetch_row($QueryResult);
do {
	echo "<tr><td>{$Row[0]}</td>";
	echo "<td>{$Row[1]}</td>";
	echo "<td align='left'>{$Row[2]}</td></tr>";
	$Row = mysqli_fetch_row($QueryResult);
} while ($Row);

echo "</table>";

//mysqli.close($connection);

?>